package jdesktop.drag;

import java.awt.*;

/**
 * Attempts to get the bounds of the screen minus app bars etc.
 */
public class ScreenBoundsTest
{
    public static void main(String[] args)
    {
        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        GraphicsDevice gd = ge.getDefaultScreenDevice();
        GraphicsConfiguration gc = gd.getDefaultConfiguration();
        // apparently, this will center windows across dual displays
        Rectangle bounds = ge.getMaximumWindowBounds();
        Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(gc);
        System.out.println("Bounds: "+bounds);
        System.out.println("Insets: "+insets);

        // this compute the correct insets, but what happens when the insets change?
        // test case - place on edge of taskbar and then change taskbar size

    }
}
